gdk: Ensure to implicitly deactivate grabs when an impl window is hidden
authorCarlos Garnacho <carlosg@gnome.org>
Sun, 14 May 2017 19:30:16 +0000 (21:30 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 25 May 2017 14:25:59 +0000 (16:25 +0200)
For some reason this wasn't done on windows with an impl, but it totally should.
Probably hidden by grabs in menus and somesuch being done on a child window.

gdk/gdkwindow.c

index 9a1616ce861b9ca988593e16d276904cdab6f5ae..b117e09818819c7856d7158ed1c7900e2dfda0bf 100644 (file)
@@ -3879,6 +3879,9 @@ gdk_window_hide (GdkWindow *window)
                                     GDK_WINDOW_STATE_WITHDRAWN);
     }
   else if (was_mapped)
+    window->state = GDK_WINDOW_STATE_WITHDRAWN;
+
+  if (was_mapped)
     {
       GdkDisplay *display;
       GdkSeat *seat;
@@ -3908,7 +3911,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
             }
         }
 
-      window->state = GDK_WINDOW_STATE_WITHDRAWN;
       g_list_free (devices);
     }